STEP 10: Let's tell the user if their guess was too high. First we need to test if guess is greater than rand_num.

  • Go to and drag If and drop it inside the for loop so that it only has a ···· in front of it.
  • Change the test variable to guess and the test value to rand_num.
  • Replace == with >. Just like in math, this tests if the test variable is greater than the test value.
  • Drop a Say command for the computer inside the if statement. It should have a ········ in front of it.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)